package cate.common.table.res.worldtree.row;

import cate.common.table.EExcelNoteField;
import cate.common.table.EExcelRowClass;
import cate.common.table.ERow;
import cp.solution.util.str.Str;
import org.apache.commons.lang3.StringUtils;

import java.util.ArrayList;
import java.util.List;

@EExcelRowClass
public class HeroShareBaseRow extends ERow {
    @EExcelNoteField(fieldName = "英雄限制数量")
    public int limitHeroCnt;

    @EExcelNoteField(fieldName = "初始解锁格子")
    public String defaultOpen;

    @EExcelNoteField(fieldName = "炼制需求经验")
    public int refineExp;

    @EExcelNoteField(fieldName = "炼制产出道具")
    public String rewardStr;

    @EExcelNoteField(fieldName = "加成开启总星级")
    public int openStarNeed;

    public List<Integer> defaultBoxs;

    @Override
    public void decode() {
        if (StringUtils.isNotBlank(this.defaultOpen)) {
            defaultBoxs = Str.strArr2intList(defaultOpen.split("#"));
        } else {
            defaultBoxs = new ArrayList<>();
        }
    }
}
